package com.guaoran.java8concurrency.java5;

import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author : guaoran
 * @Description : <br/>
 *  JUC :java.util.concurrent
 * @date :2018/11/24 13:09
 */
public class ExecutorDemo {
    public static void main(String[] args) {
        ExecutorService executor = Executors.newFixedThreadPool(1);
        executor.execute(new Runnable() {
            @Override
            public void run() {
                System.out.printf("[Thread Name :%s]Hello world....\n", Thread.currentThread().getName());
            }
        });
        //关闭线程池
        executor.shutdown();
    }
}
